package no.uib.kwikktaim.core;

import java.awt.*;

/**
 * Class for handling the JFrame.
 *
 */
public class FrameHandler {

	/**
	 * Centers a jframe on the screen
	 * @param frame the jframe that should be centered
	 */
	public static void centerScreen(Container frame) {
        Dimension dim = frame.getToolkit().getScreenSize();
        Rectangle abounds = frame.getBounds();
        frame.setLocation((dim.width - abounds.width) / 2,
            (dim.height - abounds.height) / 2);
	}


}
